<template>
  <section>
    Data and method {{a}}
    <p>{{freeze.foo}}</p>
    <button v-on:click="freeze.foo='baz'">变更它</button>
  </section>
</template>

<script>
let obj = { foo: "bar" };
Object.freeze(obj);

let data = {
  a: 1,
  newTodoText: "",
  visitCount: 0,
  hideComplatedTodos: false,
  todos: [],
  error: null,
  freeze: obj
};

export default {
  name: "DataAndMethod",
  data: () => data
};
</script>